home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk7 / blitlab3 / structures.h < prev   
C/C++ Source or Header  |  1995-03-18  |  5KB  |  183 lines

  1. /*
  2.  *   The structures and include files used in BlitLab.
  3.  */
  4. #define BANNER \
  5.    "BlitLab 1.3, Copyright (C) 1987, 1988 Radical Eye Software"
  6. #include "exec/exec.h"
  7. #include "intuition/intuition.h"
  8. #include "functions.h"
  9. #include "graphics/display.h"
  10. #include "graphics/gfx.h"
  11. #include "graphics/gfxmacros.h"
  12. #include "graphics/gfxbase.h"
  13. #include "hardware/dmabits.h"
  14. #include "hardware/blit.h"
  15. #include "stdio.h"
  16. /*
  17.  *   This is the blitter register structure we use.
  18.  */
  19. struct blitregs {
  20.    short con0, con1, size, afwm, alwm ;
  21.    short pth[4] ;
  22.    short ptl[4] ;
  23.    short mod[4] ;
  24.    short dat[4] ;
  25. } ;
  26. /*
  27.  *   A few macros to use the correct names for the above variables.
  28.  */
  29. #define BLTCON0 blitregs.con0
  30. #define BLTCON1 blitregs.con1
  31. #define BLTSIZE blitregs.size
  32. #define BLTAFWM blitregs.afwm
  33. #define BLTALWM blitregs.alwm
  34. #define BLTAPTH blitregs.pth[0]
  35. #define BLTAPTL blitregs.ptl[0]
  36. #define BLTAMOD blitregs.mod[0]
  37. #define BLTADAT blitregs.dat[0]
  38. #define BLTBPTH blitregs.pth[1]
  39. #define BLTBPTL blitregs.ptl[1]
  40. #define BLTBMOD blitregs.mod[1]
  41. #define BLTBDAT blitregs.dat[1]
  42. #define BLTCPTH blitregs.pth[2]
  43. #define BLTCPTL blitregs.ptl[2]
  44. #define BLTCMOD blitregs.mod[2]
  45. #define BLTCDAT blitregs.dat[2]
  46. #define BLTDPTH blitregs.pth[3]
  47. #define BLTDPTL blitregs.ptl[3]
  48. #define BLTDMOD blitregs.mod[3]
  49. #define BLTDDAT blitregs.dat[3]
  50. /*
  51.  *   Here we number the gadgets.
  52.  */
  53. #define GDGPNTREG (0)
  54. #define GDGGO (1)
  55. #define GDGSX (2)
  56. #define GDGSY (3)
  57. #define GDGEX (4)
  58. #define GDGEY (5)
  59. #define GDGLINE (6)
  60. #define GDGH (7)
  61. #define GDGV (8)
  62. #define GDGDESC (9)
  63. #define GDGFCI (10)
  64. #define GDGIFE (11)
  65. #define GDGEFE (12)
  66. #define GDGSETUP (13)
  67. #define GDGFUNC (14)
  68. #define GDGUSEA (15)
  69. #define GDGUSEB (16)
  70. #define GDGUSEC (17)
  71. #define GDGUSED (18)
  72. #define GDGAPT (19)
  73. #define GDGBPT (20)
  74. #define GDGCPT (21)
  75. #define GDGDPT (22)
  76. #define GDGAMOD (23)
  77. #define GDGBMOD (24)
  78. #define GDGCMOD (25)
  79. #define GDGDMOD (26)
  80. #define GDGADAT (27)
  81. #define GDGBDAT (28)
  82. #define GDGCDAT (29)
  83. #define GDGASH (30)
  84. #define GDGBSH (31)
  85. #define GDGAFWM (32)
  86. #define GDGALWM (33)
  87. #define GDGCALC (34)
  88. #define GDGSIGN (35)
  89. #define GDGOVF (36)
  90. #define GDGUNDO (37)
  91. #define GDGSIM (38)
  92. #define GDGLF (39)
  93. #define MAXGADG (40)
  94. /*
  95.  *   These defines set the size of the screen and various subareas of
  96.  *   the screen, including most gadget locations.
  97.  */
  98. #define HWINSTART (0)
  99. #define VWINSTART (2)
  100. #define HWINSIZE (640)
  101. #define VWINSIZE (198)
  102. #define HBITSTART (4)
  103. #define VBITSTART (11)
  104. #define HBITSIZE (96 * 6)
  105. #define VBITSIZE (32 * 3 + 1)
  106. #define HLMGSTART (HBITSIZE + HBITSTART + 2)
  107. #define HLMGSIZE (HWINSIZE - HLMGSTART - 5)
  108. #define VLMGSIZE (11)
  109. #define VLMG1 (VBITSTART + 1)
  110. /*#define VLMG2 (VLMG1 + 11)*/
  111. #define VLMG3 (VLMG1 + 11)
  112. /*#define VLMG4 (VLMG3 + 9)*/
  113. #define VLMG5 (VLMG3 + 34)
  114. #define VGOSTART (VLMG5 + 11)
  115. #define HGOSTART (HLMGSTART)
  116. #define HGOSIZE (HLMGSIZE)
  117. #define VGOSIZE (11)
  118. #define VLMG7 (VGOSTART + 11)
  119. #define VLMG8 (VLMG7 + 11)
  120. #define VSTRSIZE (11)
  121. #define HSTRSIZE(a) (8 * (a) + 4)
  122. #define HMGSIZE (62)
  123. #define FUNCSIZE ((HWINSIZE-HMG4START-6)/2)
  124. #define HMGSSIZE (52)
  125. #define VMGSIZE (11)
  126. #define HMGINT (1)
  127. #define VMGINT (0)
  128. #define HMG1START (HBITSTART)
  129. #define HMG2START (HMG1START + HMGSIZE + HMGINT)
  130. #define HMG3START (HMG2START + HMGSIZE + HMGINT)
  131. #define HMG4START (HMG3START + HMGSIZE + HMGINT)
  132. #define HMGFLSTART (HMG4START + FUNCSIZE)
  133. #define HMG5START (HMG4START + HMGSIZE + HMGINT)
  134. #define HMG6START (HMG5START + HMGSIZE + HMGINT - 2)
  135. #define HMG7START (HMG6START + HMGSSIZE + HMGINT)
  136. #define HMG8START (HMG7START + HMGSSIZE + HMGINT)
  137. #define HMG9START (HMG8START + HMGSSIZE + HMGINT)
  138. #define HMG10START (HMG9START + HMGSSIZE + HMGINT)
  139. #define HMG11START (HMG10START + HMGSSIZE + HMGINT)
  140. #define VMG1START (VBITSTART + VBITSIZE)
  141. #define VMG2START (VMG1START + VMGSIZE + VMGINT)
  142. #define VRVSTART (VMG2START + VMGSIZE)
  143. #define VRVL1 (VRVSTART + 4)
  144. #define VRVL2 (VRVL1 + 10)
  145. #define VRVL3 (VRVL2 + 10)
  146. #define VRVL4 (VRVL3 + 10)
  147. #define VRVL5 (VRVL4 + 10)
  148. #define VRVL6 (VRVL5 + 11)
  149. #define VRVLL1 (VRVSTART + 2)
  150. #define VRVLL2 (VRVLL1 + 9)
  151. #define VRVLL3 (VRVLL2 + 11)
  152. #define VRVLL4 (VRVLL3 + 11)
  153. #define VRVLL5 (VRVLL4 + 11)
  154. #define VRVLL6 (VRVLL5 + 11)
  155. #define VRG1 (VRVLL1 + 8)
  156. #define VRVSIZE (VWINSIZE - VRVSTART - 2)
  157. #define HRVSIZE (HWINSIZE - HBITSTART - 3)
  158. #define HRVSTART (HBITSTART)
  159. #define HRVC1 (HRVSTART + 6)
  160. #define HRVC2 (HRVC1 + 5 * 8)
  161. #define HRVC3 (HRVC2 + 5 * 8)
  162. #define HRVC4 (HRVC3 + 2 * 8)
  163. #define HRVC5 (HRVC4 + 5 * 8)
  164. #define HRVC6 (HRVC5 + 5 * 8)
  165. #define HRVC6B (HRVC6 + 5 * 8)
  166. #define HMVSTART (HRVC6B + 35)
  167. #define HRVC7 (HRVC6B + 5 * 8)
  168. #define HRVC8 (HRVC7 + 2 * 8)
  169. #define HRVC9 (HRVC8 + 3 * 8 + 4)
  170. #define HRVC10 (HRVC9 + 9 * 8)
  171. #define HRVC11 (HRVC10 + 7 * 8)
  172. #define HRVC12 (HRVC11 + 19 * 8)
  173. #define VTEXTOFF (2)
  174. #define HTEXTOFF (2)
  175. /*
  176.  *   Colors.
  177.  */
  178. #define BLUE (0)
  179. #define WHITE (1)
  180. #define BLACK (2)
  181. #define ORANGE (3)
  182.  
  183.